<template>
   <el-dialog title="详情" :close-on-click-modal="false"  :visible.sync="show"  
   class="dialog_image dialog_index" :before-close="cancle">
   <el-table class="table_dialog_40" :data="data">
    <el-table-column  label="用户昵称"  prop="nickname" ></el-table-column>
    <el-table-column  label="国家"  prop="country" ></el-table-column>
    <el-table-column  label="回复内容"  prop="content" ></el-table-column>
    <el-table-column  label="回复当地日期"  prop="local_time" ></el-table-column>
    <el-table-column  label="创建日期"  prop="create_time" ></el-table-column>
   </el-table>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancle">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
import  { get_article_comment_reply }  from '@/api/article/article_comment.js'
export default {
  data () {
    return {
      data: {}
    }
  },
  props: {
    show: Boolean,
    closeDialog:Function,
  },
  cancle() {
    this.$emit('closeDialog')
  },
  watch: {
    show: function() {
      if(this.show){
        this.getData()
      }
    }
  },
  methods: {
    getData () {
      let params = {
        article_comment_id: this.$parent.curId
      }
      get_article_comment_reply(params).then(res => {
        console.log(res)
        if(res.state == 1) {
          this.data = res.data
        }
      })
    },
    cancle() {
      this.$emit('closeDialog')
    },
  }
}
</script>

<style>

</style>